package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50);comment:用户名"`
	Password string `gorm:"type:varchar(50);comment:密码"`
}
type UserRole struct {
	gorm.Model
	UserId int `gorm:"type:int"`
	RoleId int `gorm:"type:int"`
}
type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(50);comment:角色名"`
}
type RoleNode struct {
	gorm.Model
	RoleId int `gorm:"type:int"`
	NodeId int `gorm:"type:int"`
}
type Node struct {
	gorm.Model
	NodeId string `gorm:"type:varchar(50);comment:权限名"`
}

type Good struct {
	gorm.Model
	GoodCode string `gorm:"type:varchar(50);comment:商品编号"`
	GoodName string `gorm:"type:varchar(50);comment:商品名称"`
}
type GoodOrder struct {
	gorm.Model
	Gid        int    `gorm:"type:int"`
	OrderCode  string `gorm:"type:varchar(50);comment:订单编号"`
	OrderPrice int    `gorm:"type:int;comment:订单价格"`
}
type GoodOrderList struct {
	gorm.Model
	OrderId    int
	OrderCode  string
	OrderPrice int
	GoodCode   string
	GoodName   string
}
